﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using Hardanger.Features;

namespace Hardanger.Features.ServerFuzzer.DetectionEngine
{
    public class NonHttp200ResponseCodeDetectionEngine : IDetectionEngine
    {
        private static NonHttp200ResponseCodeDetectionEngine _current;
        public static NonHttp200ResponseCodeDetectionEngine Current
        {
            get
            {
                if (_current == null)
                    _current = new NonHttp200ResponseCodeDetectionEngine();
                return _current;
            }
        }

        public bool ProcessResponse(TCPWebResponse httpResponse)
        {
            if (httpResponse.StatusCode != "200")
            {
                return true;
            }
            return false;
        }

        public string Name
        {
            get
            {
                return "Non-Http 200 Response";
            }
        }
    }
}
